package com.sierrawireless.www.airvantage.schema.ws.unit._1_0;

public class UnitServicesProxy implements com.sierrawireless.www.airvantage.schema.ws.unit._1_0.UnitServices {
  private String _endpoint = null;
  private com.sierrawireless.www.airvantage.schema.ws.unit._1_0.UnitServices unitServices = null;
  
  public UnitServicesProxy() {
    _initUnitServicesProxy();
  }
  
  public UnitServicesProxy(String endpoint) {
    _endpoint = endpoint;
    _initUnitServicesProxy();
  }
  
  private void _initUnitServicesProxy() {
    try {
      unitServices = (new com.sierrawireless.www.airvantage.schema.ws.unit._1_0.UnitServicesServiceLocator()).getUnitServicesSoap11();
      if (unitServices != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)unitServices)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)unitServices)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (unitServices != null)
      ((javax.xml.rpc.Stub)unitServices)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.sierrawireless.www.airvantage.schema.ws.unit._1_0.UnitServices getUnitServices() {
    if (unitServices == null)
      _initUnitServicesProxy();
    return unitServices;
  }
  
  public com.sierrawireless.www.airvantage.schema.ws.commons._1_0.UpdateResponse update(com.sierrawireless.www.airvantage.schema.ws.unit._1_0.UpdateRequest updateRequest) throws java.rmi.RemoteException{
    if (unitServices == null)
      _initUnitServicesProxy();
    return unitServices.update(updateRequest);
  }
  
  public com.sierrawireless.www.airvantage.schema.ws.unit._1_0.QuerySubscribersResponse querySubscribers(com.sierrawireless.www.airvantage.schema.ws.unit._1_0.QuerySubscribersRequest querySubscribersRequest) throws java.rmi.RemoteException{
    if (unitServices == null)
      _initUnitServicesProxy();
    return unitServices.querySubscribers(querySubscribersRequest);
  }
  
  public com.sierrawireless.www.airvantage.schema.ws.unit._1_0.QueryResponse query(com.sierrawireless.www.airvantage.schema.ws.unit._1_0.QueryRequest queryRequest) throws java.rmi.RemoteException{
    if (unitServices == null)
      _initUnitServicesProxy();
    return unitServices.query(queryRequest);
  }
  
  public com.sierrawireless.www.airvantage.schema.ws.unit._1_0.GetSubscriberDescriptorsResponse getSubscriberDescriptors(com.sierrawireless.www.airvantage.schema.ws.unit._1_0.GetSubscriberDescriptorsRequest getSubscriberDescriptorsRequest) throws java.rmi.RemoteException{
    if (unitServices == null)
      _initUnitServicesProxy();
    return unitServices.getSubscriberDescriptors(getSubscriberDescriptorsRequest);
  }
  
  public com.sierrawireless.www.airvantage.schema.ws.commons._1_0.CreateResponse create(com.sierrawireless.www.airvantage.schema.ws.unit._1_0.CreateRequest createRequest) throws java.rmi.RemoteException{
    if (unitServices == null)
      _initUnitServicesProxy();
    return unitServices.create(createRequest);
  }
  
  
}